package fr.imag.adele.cprobes.util;

import java.util.Vector;

/**
 * The DataSet
 * Used to store a set of Data Events.
 * 
 * @author Bassem DEBBABI
 *
 */
public class DataSet {

	private Vector m_dataEvents = new Vector();
	
	/**
	 * Add a DataEvent to the list
	 * @param dataEvent
	 */
	public void add(DataEvent dataEvent){
		m_dataEvents.add(dataEvent);
	}
	/**
	 * remove a DataEvent from the list
	 * @param dataEvent
	 */
	public void remove(DataEvent dataEvent){
		m_dataEvents.remove(dataEvent);
	}
	/**
	 * remove all the stored DataEvents
	 */
	public void removeAllEvents(){		
		m_dataEvents.removeAllElements();
	}
	/**
	 * get the size of list
	 * @return the size of list
	 */
	public int size(){
		return m_dataEvents.size();
	}
	/**
	 * get the DataEvent on the i position
	 * @param i position
	 * @return the DataEvent on the i position
	 */
	public DataEvent getDataEvent(int i){
		return (DataEvent)m_dataEvents.get(i);
	}
	/**
	 * get all stored DataEvents
	 * @return a list of DataEvents
	 */
	public Vector getAllDataEvents(){
		return m_dataEvents;
	}
	/**
	 * set a new content of the list
	 * @param dataEvents
	 */
	public void setDataEvents(Vector dataEvents){
		this.m_dataEvents = dataEvents;
	}	
}
